import {
	createSSRApp
} from "vue";
import 'virtual:uno.css';
import App from "./App.vue";
import uviewPlus from '@/uni_modules/uview-plus'
import {setupStore} from './store/index.js';
// import {createI18n} from 'vue-i18n'
import i18n from "./locale";

// import en from './en.json'
// import zhHans from './zh-Hans.json'
// import zhHant from './zh-Hant.json'

// const messages = {
// 	legacy:false,
// 	en,
// 	'zh-Hans' : zhHans,
// 	'zh-Hant' : zhHant
// }
// let i18nConfig = {
// 	locale:uni.getLocale(),//获取已经设置的语言
// 	messages
// }

// const i18n = createI18n(i18nConfig)
export function createApp() {
	const app = createSSRApp(App);
	app.use(uviewPlus)
	app.use(i18n);
	setupStore(app);
	return {
		app,
	};
}
